package com.baizhi.springcloud.service.impl;

import com.baizhi.springcloud.dao.DeptDAO;
import com.baizhi.springcloud.pojo.Dept;
import com.baizhi.springcloud.service.DeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DeptServiceImpl implements DeptService {

    @Autowired
    private DeptDAO deptDAO;

    public boolean addDept(Dept dept) {
        return deptDAO.addDept(dept);
    }

    public Dept queryById(Integer id) {
        return deptDAO.queryById(id);
    }

    public List<Dept> queryAll() {
        return deptDAO.queryAll();
    }
}
